﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

#endregion

namespace Weazel.Badger.Vhdl.Types
{
  public class StdLogicVector : ArrayType
  {
		private bool ascending = false;

    public StdLogicVector(int width, bool ascending) : base(Types.StdLogicVector, width, new StdLogic())
    {
			this.ascending = ascending;
    }

		public StdLogicVector(int width) 
			: this(width, false)
		{
		}

    public override string ToString()
    {
			return ascending ?
					string.Format("std_logic_vector(0 to {0})", Width - 1)
				: string.Format("std_logic_vector({0} downto 0)", Width - 1);
    }
  }
}
